﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{

    [ServiceContract(Namespace = "http://HRMService")]
    public interface ISalaryAllowance
    {
        [OperationContract]
        int SalaryAllowance_Using(int SalaryAllowanceID);
        [OperationContract]
        DataSet SalaryAllowance_GetAll();

        [OperationContract]
        SalaryAllowanceInfo SalaryAllowance_GetInfo(int SalaryAllowanceID);

        [OperationContract]
        DataSet SalaryAllowance_GetList(out int ItemCount, int currentPage, int pageSize);

        [OperationContract]
        int SalaryAllowance_Insert(SalaryAllowanceInfo eInfo);

        [OperationContract]
        bool SalaryAllowance_Update(SalaryAllowanceInfo eInfo);

        [OperationContract]
        bool SalaryAllowance_Delete(int SalaryAllowanceID);

        [OperationContract]
        bool SalaryAllowance_Exist(int _ID, string _Name, int _Type);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class SalaryAllowanceInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        int _Type;
        [DataMember]
        public int Type
        {
            get { return _Type; }
            set { _Type = value; }
        }
        decimal _Rate;
        [DataMember]
        public decimal Rate
        {
            get { return _Rate; }
            set { _Rate = value; }
        }
        decimal _Level;
        [DataMember]
        public decimal Level
        {
            get { return _Level; }
            set { _Level = value; }
        }
    }

}
